<%@page import="java.util.*"%>
<html>
<body>

<script>
var count = 0,
    stringList = [];

function incrementIndex() {

  count += 1;
}

function addString(string) {

  stringList.push(string)
}

function handleButton1Click(e) {

  addString(e.someEventProperty);
  incrementIndex();
}

</script>
<%
ArrayList arr= new ArrayList();
String ele="3,2";
%>


<button onclick="handleButton1Click()">Button 1</button>
</tr>
<%=arr %>

</body>
</html>